package com.wsb.wetchat.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

/**
 * @author wang shaobo
 * @date 2022/6/30  10:01
 */
@Component
public class RestTemplateUtils {

    @Autowired
    RestTemplate restTemplate;


    public <T> ResponseEntity<T> get(String url, Class<T> responseType){
        return restTemplate.getForEntity(url, responseType);

    }


}
